<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${initParam.domain}">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap -->
    <link href="static/css/bootstrap.min.css" rel="stylesheet">
    <title>所有文章</title>
</head>
<body>
    <div class="container">
        <div class="page-header">
            <h1>所有文章<small><a href="article/publish">发布</a></small></h1>
        </div>
        <div class="page-body">
            <c:forEach items="${article }" var="aO">
                <dl>
                    <dt>${aO.title }</dt>
                    <dd>${aO.description }</dd>
                </dl>
            </c:forEach>
        </div>
        <nav>
            <c:set var="pUS" value="${pO['prev']}" scope="request" />
            <c:set var="nUS" value="${pO['next']}" scope="request" />
            <ul class="pagination">
                <li><a href="${pUS}" aria-label="Previous">上一页</a></li>
                <c:forEach items="${pH}" var="pnum">
                <c:choose>
                <c:when test="${pnum.key eq param.p}"><li class="active"><span>${pnum.key}</span></li></c:when>
                <c:otherwise><li><a href="${pnum.value}">${pnum.key}</a></li></c:otherwise>
                </c:choose>
                </c:forEach>
                <li><a href="${nUS}" aria-label="Next">下一页</a></li>
            </ul>
        </nav>
    </div>
</body>
</html>